package com.lp.rpc;

import com.lp.rpc.annotation.LpClient;
import com.lp.rpc.bean.User;
import com.lp.rpc.client.LpClientProxy;
import com.lp.rpc.service.HelloService;
import com.lp.rpc.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * TODO
 *
 * @author 刘牌
 * @version 1.0
 * @date 2021/8/22 0022 21:31
 */
public class LpClientBootstrap {


    public static void main(String[] args){
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring.xml");
        HelloService helloService = LpClientProxy.createProxy(HelloService.class, "", "");
//        ExecutorService executorService = Executors.newCachedThreadPool();
//        for (int i = 0 ; i < 20 ; i++){
//            executorService.execute(new Runnable() {
//                @Override
//                public void run() {
                    System.out.println(helloService.sayHello());
//                }
//            });
//        }

    }
}

